package com.itmayiedu.controller;

import com.itmayiedu.service.impl.StudentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * *******************************************
 *
 * @description:
 * @author: by jgl
 * @date: 2018/1/28 0028 下午 3:39
 * @version:1.0 *******************************************
 */
@RestController
public class AsyncController {

    @Autowired
    private StudentServiceImpl studentService;

    @RequestMapping("/async")
    public String async(){
        System.out.println("####===async=====## 1");
        studentService.doAsync();
        System.out.println("####===async=====## 4");
        return "success";
    }

    @Value("${domain_name}")
    private String domainName;

    @RequestMapping("/domain")
    public String name(){
        return domainName;
    }
}
